<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8"/>
    <link href="../static/global/plugins/font-awesome/css/font-awesome.min.css" th:href="@{/global/plugins/font-awesome/css/font-awesome.min.css}" rel="stylesheet" type="text/css" />
    <link href="../static/global/plugins/bootstrap/css/bootstrap.min.css" th:href="@{/global/plugins/bootstrap/css/bootstrap.min.css}" rel="stylesheet" type="text/css"/>
    <link href="../static/global/css/components.min.css" th:href="@{/global/css/components.min.css}" rel="stylesheet" id="style_components" type="text/css"/>
    <link href="../static/global/css/plugins.min.css" th:href="@{/global/css/plugins.min.css}" rel="stylesheet" type="text/css"/>
    <link href="../static/layouts/layout/css/layout.css" th:href="@{/layouts/layout/css/layout.css}" rel="stylesheet" type="text/css"/>
</head>
<body>
<div class="page-bar">
    <ul class="page-breadcrumb">
        <li>
            <a href="#">用户权限管理</a>
            <i class="fa fa-circle"></i>
        </li>
        <li>
            <span>站点编辑</span>
        </li>
    </ul>
</div>

<div class="row">
    <div class="col-md-12">
        <div class="portlet box green">
            <div class="portlet-title">
                <div class="caption">
                    <i class="fa fa-gift"></i>录入框
                </div>
                <div class="tools">
                    <a href="javascript:;" class="collapse"> </a>
                </div>
            </div>
            <div class="portlet-body form">
                <form id="edit_form" class="form-horizontal" action="/site/create" method="post">
                    <div class="form-body">
                        <div class="form-group">
                            <label class="col-md-3 control-label">站点编号<span class="required"> * </span></label>
                            <div class="col-md-4">
                                <input type="text" name="siteNo" th:value="${site.siteNo}" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">站点名称<span class="required"> * </span></label>
                            <div class="col-md-4">
                                <input type="text" name="name" th:value="${site.name}" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">链接</label>
                            <div class="col-md-4">
                                <input type="text" name="url" th:value="${site.url}" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">客户端ID</label>
                            <div class="col-md-4">
                                <input type="text" name="clientId" th:value="${site.clientId}" class="form-control"/>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-md-3 control-label">客户端密钥</label>
                            <div class="col-md-4">
                                <input type="text" name="clientSecret" th:value="${site.clientSecret}" class="form-control"/>
                            </div>
                        </div>
                    </div>
                    <div class="alert alert-danger display-hide">
                        <button class="close" data-close="alert"></button>
                        <span>Enter any username and password. </span>
                    </div>
                    <div class="form-actions">
                        <div class="row">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn green" type="submit">保存</button>
                                <button class="btn default" onclick="javascript:history.back();" type="button">返回</button>                            </div>
                        </div>
                    </div>
                </form>
                <!-- END FORM-->
            </div>
        </div>
    </div>
</div>
<!-- END FOOTER -->
<!--[if lt IE 9]>
<script src="../static/global/plugins/respond.min.js" th:src="@{/global/plugins/respond.min.js}"></script>
<script src="../static/global/plugins/excanvas.min.js" th:src="@{/global/plugins/excanvas.min.js}"></script>
<script src="../static/global/plugins/ie8.fix.min.js" th:src="@{/global/plugins/ie8.fix.min.js}"></script>
<![endif]-->
<script src="../static/global/plugins/jquery.min.js" th:src="@{/global/plugins/jquery.min.js}" type="text/javascript"></script>
<script src="../static/global/plugins/bootstrap/js/bootstrap.min.js" th:src="@{/global/plugins/bootstrap/js/bootstrap.min.js}" type="text/javascript"></script>
<script src="../static/global/plugins/jquery.blockui.min.js" th:src="@{/global/plugins/jquery.blockui.min.js}" type="text/javascript"></script>
<script src="../static/global/scripts/app.js" th:src="@{/global/scripts/app.js}" type="text/javascript"></script>
<script src="../static/layouts/layout/scripts/layout.js" th:src="@{/layouts/layout/scripts/layout.js}" type="text/javascript"></script>
<script src="../static/global/plugins/jquery-validation/js/jquery.validate.min.js" th:src="@{/global/plugins/jquery-validation/js/jquery.validate.min.js}" type="text/javascript"></script>
<script src="../static/global/plugins/jquery-validation/js/additional-methods.js" th:src="@{/global/plugins/jquery-validation/js/additional-methods.js}" type="text/javascript"></script>
<script src="../static/global/plugins/jquery.form.min.js" th:src="@{/global/plugins/jquery.form.min.js}" type="text/javascript"></script>
<script src="../static/layouts/page/scripts/rbac_site_edit.js" th:src="@{/layouts/page/scripts/rbac_site_edit.js}" type="text/javascript"></script>
<script th:inline="javascript">
    /*<![CDATA[*/
    var op = [[${op}]];
    var siteId = [[${site.id}]];
    if(op=='update'){
        $('#edit_form').attr("action","/site/"+siteId+"/update");
    }
    /*]]>*/
</script>
</body>
</html>